package com.bolt.auth.admin.api.sys.entity;

import com.bolt.support.spring.jpa.entity.BaseTreeEntity;
import lombok.Data;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;

/**
 * Auto Generate Javadoc
 *
 * @author 日期:2018-02-07 16:11:28
 *         中国行政地区表
 **/
@Access(AccessType.FIELD)
@Entity
@Table(name = "sys_area")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Data
public class AreaEntity extends BaseTreeEntity <Long, AreaEntity> {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AREA_SEQ")
    @SequenceGenerator(sequenceName = "area_seq", allocationSize = 1, name = "AREA_SEQ")
    private Long id;

    @Column(name = "area_level", length = 3)
    private Integer areaLevel;

    @Column(name = "area_code", length = 20)
    private String areaCode;

    @Column(name = "zip_code", length = 7)
    private String zipCode;

    @Column(name = "city_code", length = 6)
    private String cityCode;

    @Column(name = "name", length = 50)
    private String name;

    @Column(name = "short_name", length = 50)
    private String shortName;

    @Column(name = "merger_name", length = 50)
    private String mergerName;

    @Column(name = "pinyin", length = 30)
    private String pinyin;

    @Column(name = "lng", length = 10)
    private java.math.BigDecimal lng;

    @Column(name = "lat", length = 10)
    private java.math.BigDecimal lat;

}